package com.qf.j2112.po;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysUser {
    private Integer uid;
    private String uname;
    private String password;
    private String realName;
    private String tel;
    private String email;
    private Integer stateCode;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;
    //实体
    private Status state;
    private String code;

    public String getCode() {
        if(this.stateCode!=null){
            if(this.stateCode==1){
                return "启用";
            }else{
                return "禁用";
            }
        }  else {
            return null;
        }
    }
}
